
import java.sql.SQLException;
import javax.swing.*;
import javax.swing.JOptionPane;
import java.util.Calendar;

/*
 * applicantMainPage.java
 *
 * Created on March 27, 2008, 8:28 PM
 */



/**
 *
 * @author  Dustin Shiflett
 */
public class applicantMainPage extends javax.swing.JFrame {
    
    dbAccess dbLink;
    boolean searchPopulated = false;
    boolean showAllJobs = false;
    /** Creates new form applicantMainPage */
    public applicantMainPage() {
        initComponents();
    }
    
    public void setDB(dbAccess link) {
        dbLink = link;
        //JOptionPane.showMessageDialog(null, "dbAccess transferred for: " + dbLink.getEmail());
    }
    
    private void profileTab(){
        String[] profile = new String[6];
        //Profile tab selected, so we need to query DB to display profile info
        submitBtn.setEnabled(true);
        try {
            profile = dbLink.getApplicantProfile();
            phoneTxt.setText(profile[0].replace(" ", ""));
            degreeSelect.setSelectedItem(new String(profile[1])); //NO-FIXME: Can we just put index in DB? So much easier
            birthYear.setValue(new Integer(Integer.parseInt(profile[2]))); //FIXED-minor: This is making the control ding, from the custom code
            yearsExperience.setValue(new Integer(Integer.parseInt(profile[3])));
            citizenshipSelect.setSelectedItem(new String(profile[4])); //NO-FIXME: Can we just put index in DB? So much easier
            descriptionTxt.setText(profile[5]);
        } catch (SQLException se) {
            JOptionPane.showMessageDialog(null,
                              new String[] {  // Display a 2-line message
                                  se.getClass().getName() + ": ",
                                  se.getMessage()
                              });
            submitBtn.setEnabled(false);
        }
    }
    
    private void clearSearchTable(){
        searchPopulated = false;
        javax.swing.table.DefaultTableModel model = new javax.swing.table.DefaultTableModel();
        model.addColumn(new String("Job Title"));
        model.addColumn(new String("Employer"));
        model.addColumn(new String("Location"));
        model.addColumn(new String("Position Type"));
        model.addColumn(new String("Industry"));
        model.addColumn(new String("Min Salary"));
        searchResultsTbl.setModel(model);
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        tabbedPane = new javax.swing.JTabbedPane();
        jobsPanel = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        searchResultsTbl = new javax.swing.JTable();
        jPanel2 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        fullTimeChk = new javax.swing.JCheckBox();
        partTimeChk = new javax.swing.JCheckBox();
        internshipChk = new javax.swing.JCheckBox();
        tempChk = new javax.swing.JCheckBox();
        keywordTxt = new javax.swing.JTextField();
        industrySelect = new javax.swing.JComboBox();
        minSalaryTxt = new javax.swing.JFormattedTextField(0);
        jLabel1 = new javax.swing.JLabel();
        searchBtn = new javax.swing.JButton();
        clearBtn = new javax.swing.JButton();
        searchResultsLbl = new javax.swing.JLabel();
        statusPanel = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        appStatusTbl = new javax.swing.JTable();
        showAllJobsBtn = new javax.swing.JButton();
        profilePanel = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        degreeSelect = new javax.swing.JComboBox();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        citizenshipSelect = new javax.swing.JComboBox();
        jScrollPane3 = new javax.swing.JScrollPane();
        descriptionTxt = new javax.swing.JTextArea();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        submitBtn = new javax.swing.JButton();
        javax.swing.text.MaskFormatter fmt = null;
        // A phone number
        try {
            fmt = new javax.swing.text.MaskFormatter("###-###-####");
        } catch (java.text.ParseException e) {
        }
        phoneTxt = new javax.swing.JFormattedTextField(fmt);
        birthYear = new javax.swing.JSpinner();
        yearsExperience = new javax.swing.JSpinner();
        signOutBtn = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Applicant Page");
        setName("applicantFrm"); // NOI18N

        tabbedPane.setFont(new java.awt.Font("Times New Roman", 1, 14));
        tabbedPane.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                tabbedPaneStateChanged(evt);
            }
        });

        searchResultsTbl.setBackground(new java.awt.Color(255, 255, 204));
        searchResultsTbl.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        searchResultsTbl.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Job title", "Employer", "Location", "Position Type", "Industry", "Min Salary"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        searchResultsTbl.setName("jobSearchResult"); // NOI18N
        searchResultsTbl.setSelectionBackground(new java.awt.Color(204, 255, 204));
        searchResultsTbl.getTableHeader().setReorderingAllowed(false);
        searchResultsTbl.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                searchResultsTblMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(searchResultsTbl);

        jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        jLabel2.setText("Position Type");

        jLabel3.setText("Industry");

        jLabel4.setText("Keyword in job title");

        jLabel5.setText("Minimum Salary");

        fullTimeChk.setText("Full time");

        partTimeChk.setText("Part time");
        partTimeChk.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                partTimeChkActionPerformed(evt);
            }
        });

        internshipChk.setText("Internship");

        tempChk.setText("Temporary");

        keywordTxt.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                keywordTxtActionPerformed(evt);
            }
        });

        industrySelect.setMaximumRowCount(25);
        industrySelect.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Any", "Accounting", "Automobile", "Computer", "Construction", "Education", "Entertainment", "Fashion", "Government", "Insurance", "Investment", "Medical", "Religious", "Service", "Sales", "Technical" }));
        industrySelect.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                industrySelectActionPerformed(evt);
            }
        });

        minSalaryTxt.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                minSalaryTxtActionPerformed(evt);
            }
        });

        jLabel1.setText("$");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel1)
                .addGap(0, 0, 0)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(fullTimeChk)
                        .addGap(18, 18, 18)
                        .addComponent(partTimeChk)
                        .addGap(18, 18, 18)
                        .addComponent(internshipChk, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(tempChk))
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(minSalaryTxt, javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(industrySelect, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(keywordTxt, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 161, Short.MAX_VALUE)))
                .addContainerGap(50, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap(19, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(fullTimeChk)
                    .addComponent(partTimeChk)
                    .addComponent(internshipChk)
                    .addComponent(tempChk))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(industrySelect, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(keywordTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(minSalaryTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1))
                .addContainerGap())
        );

        searchBtn.setText("Search");
        searchBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                searchBtnActionPerformed(evt);
            }
        });

        clearBtn.setText("Clear");
        clearBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                clearBtnActionPerformed(evt);
            }
        });

        searchResultsLbl.setText("Search Results");

        javax.swing.GroupLayout jobsPanelLayout = new javax.swing.GroupLayout(jobsPanel);
        jobsPanel.setLayout(jobsPanelLayout);
        jobsPanelLayout.setHorizontalGroup(
            jobsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jobsPanelLayout.createSequentialGroup()
                .addGroup(jobsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jobsPanelLayout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jobsPanelLayout.createSequentialGroup()
                        .addGap(35, 35, 35)
                        .addComponent(searchBtn)
                        .addGap(48, 48, 48)
                        .addComponent(clearBtn))
                    .addGroup(jobsPanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(searchResultsLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 775, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(24, Short.MAX_VALUE))
        );
        jobsPanelLayout.setVerticalGroup(
            jobsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jobsPanelLayout.createSequentialGroup()
                .addGap(31, 31, 31)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jobsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(clearBtn)
                    .addComponent(searchBtn))
                .addGap(18, 18, 18)
                .addComponent(searchResultsLbl, javax.swing.GroupLayout.DEFAULT_SIZE, 18, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(31, 31, 31))
        );

        tabbedPane.addTab("Jobs", jobsPanel);

        appStatusTbl.setBackground(new java.awt.Color(255, 255, 204));
        appStatusTbl.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
        appStatusTbl.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Job Title", "Employer", "Date Applied", "Status"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        appStatusTbl.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                appStatusTblMouseClicked(evt);
            }
        });
        jScrollPane2.setViewportView(appStatusTbl);

        showAllJobsBtn.setText("Show all jobs");
        showAllJobsBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                showAllJobsBtnActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel);
        statusPanel.setLayout(statusPanelLayout);
        statusPanelLayout.setHorizontalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addGap(37, 37, 37)
                .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(showAllJobsBtn)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 671, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(91, Short.MAX_VALUE))
        );
        statusPanelLayout.setVerticalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addGap(51, 51, 51)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 228, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(37, 37, 37)
                .addComponent(showAllJobsBtn)
                .addContainerGap(139, Short.MAX_VALUE))
        );

        tabbedPane.addTab("Status", statusPanel);

        jLabel7.setFont(new java.awt.Font("Times New Roman", 1, 14));
        jLabel7.setText("Update an Applicant Profile");

        jLabel6.setFont(new java.awt.Font("Times New Roman", 0, 12));
        jLabel6.setText("Phone");

        degreeSelect.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Not Selected", "PhD", "Specialist", "Master", "Bachelor", "High School or below" }));

        jLabel11.setFont(new java.awt.Font("Times New Roman", 0, 12));
        jLabel11.setText("Highest degree");

        jLabel12.setFont(new java.awt.Font("Times New Roman", 0, 12));
        jLabel12.setText("Birth year");

        jLabel13.setFont(new java.awt.Font("Times New Roman", 0, 12));
        jLabel13.setText("Years of experience");

        jLabel14.setFont(new java.awt.Font("Times New Roman", 0, 12));
        jLabel14.setText("Citizenship");

        citizenshipSelect.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Not Selected", "US", "Canadian", "Mexican", "Others" }));

        descriptionTxt.setColumns(20);
        descriptionTxt.setLineWrap(true);
        descriptionTxt.setRows(5);
        descriptionTxt.setWrapStyleWord(true);
        jScrollPane3.setViewportView(descriptionTxt);
        descriptionTxt.setDocument(new JTextFieldLimit(500));

        jLabel15.setFont(new java.awt.Font("Times New Roman", 0, 12));
        jLabel15.setText("Short Description");

        jLabel16.setFont(new java.awt.Font("Times New Roman", 0, 12));
        jLabel16.setText("(Not exceed 500 characters)");

        submitBtn.setFont(new java.awt.Font("Times New Roman", 0, 12));
        submitBtn.setText("Submit");
        submitBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                submitBtnActionPerformed(evt);
            }
        });

        //Set possible values
        Calendar calendar = Calendar.getInstance();
        int currentYear = calendar.get(Calendar.YEAR);
        SpinnerModel yearModel = new SpinnerNumberModel(currentYear - 25, //initial value (25-year old)
            currentYear - 110, //min (110 years before today)
            currentYear, //max (this year, though no 0 year old will apply)
            1);                //step
        birthYear.setModel(yearModel);
        birthYear.setEditor(new JSpinner.NumberEditor(birthYear, "#")); //Let the field only accept numeric input

        SpinnerModel expModel = new SpinnerNumberModel(0, //initial value
            0, //min
            100, //max
            1); //step
        yearsExperience.setModel(expModel);
        yearsExperience.setEditor(new JSpinner.NumberEditor(yearsExperience, "#")); //Let the field only accept numeric input

        javax.swing.GroupLayout profilePanelLayout = new javax.swing.GroupLayout(profilePanel);
        profilePanel.setLayout(profilePanelLayout);
        profilePanelLayout.setHorizontalGroup(
            profilePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(profilePanelLayout.createSequentialGroup()
                .addGroup(profilePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(profilePanelLayout.createSequentialGroup()
                        .addGap(64, 64, 64)
                        .addGroup(profilePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(profilePanelLayout.createSequentialGroup()
                                .addGroup(profilePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(27, 27, 27)
                                .addGroup(profilePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(phoneTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(birthYear, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, profilePanelLayout.createSequentialGroup()
                                        .addGroup(profilePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(degreeSelect, javax.swing.GroupLayout.Alignment.LEADING, 0, 187, Short.MAX_VALUE)
                                            .addComponent(citizenshipSelect, javax.swing.GroupLayout.Alignment.LEADING, 0, 187, Short.MAX_VALUE)
                                            .addComponent(yearsExperience, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGap(375, 375, 375))))
                            .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                    .addGroup(profilePanelLayout.createSequentialGroup()
                        .addGap(188, 188, 188)
                        .addComponent(submitBtn)))
                .addContainerGap())
        );
        profilePanelLayout.setVerticalGroup(
            profilePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(profilePanelLayout.createSequentialGroup()
                .addGap(59, 59, 59)
                .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(11, 11, 11)
                .addGroup(profilePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(phoneTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(profilePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(degreeSelect, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(profilePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(birthYear, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(profilePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(yearsExperience, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(profilePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(citizenshipSelect, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(profilePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(profilePanelLayout.createSequentialGroup()
                        .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(22, 22, 22)
                .addComponent(submitBtn)
                .addGap(90, 90, 90))
        );

        phoneTxt.setText("000-000-0000");

        tabbedPane.addTab("Profile", profilePanel);

        signOutBtn.setText("Sign out");
        signOutBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                signOutBtnActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(729, Short.MAX_VALUE)
                .addComponent(signOutBtn)
                .addGap(24, 24, 24))
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(tabbedPane, javax.swing.GroupLayout.PREFERRED_SIZE, 804, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addComponent(signOutBtn)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(tabbedPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(64, Short.MAX_VALUE))
        );

        tabbedPane.getAccessibleContext().setAccessibleName("Jobs");
        tabbedPane.getAccessibleContext().setAccessibleDescription("Jobs");

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void searchBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchBtnActionPerformed
        // TODO add your handling code here:
        String keyWords, dbQuery, noCommaMinSalary, posTypeQuery, industryQuery, keyWordQuery;
        String minSalaryQuery;
        boolean needWhere = false; //So we know to include WHERE in our query or not
        boolean needMinSal = false;
        boolean needKeywords = false;
        boolean needPosType = false;
        boolean needIndustry = false;
        int minSalary = 0; //Maximum Formatted Text Field Value is 9,999,999,999
        int chkBoxesSelected = 0;
        javax.swing.table.TableModel model = null;
        
        keyWordQuery = new String("");
        keyWords = keywordTxt.getText();
        if(!keyWords.isEmpty()) {
            //Removing additional format safety
            /*keyWords.replaceAll("; ", ";");
            keyWords.replaceAll(";", " ");
            keyWords.replaceAll(", ", ",");
            keyWords.replaceAll(",", " ");*/
            keyWords = keyWords.toLowerCase(); //put everything in lower case
            String[] words = keyWords.split(" ");
            int i = 0;
            needWhere = needKeywords = true;
            for(String word : words) {
                if (i > 0) {
                    keyWordQuery = keyWordQuery.concat(" OR ");
                }
                //FIXED: Added LOWER function so we are checking everything in lowercase
                keyWordQuery = keyWordQuery.concat("LOWER(JOB_TITLE) LIKE '%" + word + "%'");
                i++;
            }
        }
        //keyword(s) set-up for query--just add pre and post spacing
        
        noCommaMinSalary = minSalaryTxt.getText().replace(",", "");
        //JOptionPane.showMessageDialog(null, "min salary: " + noCommaMinSalary);
        if (!(noCommaMinSalary.equals("")) && (Integer.parseInt(noCommaMinSalary) > 0)){ //Is there min salary input?
            minSalary = Integer.parseInt(noCommaMinSalary);
            minSalaryQuery = new String("MIN_SALARY >= " + minSalary);
            needWhere = needMinSal = true;
        } else {
            minSalary = 0;
            minSalaryQuery = new String("");
        }
        //min salary is setup for query
        
        posTypeQuery = posTypeQuery = new String("");
        if(fullTimeChk.isSelected()) {
            chkBoxesSelected++;
            posTypeQuery = posTypeQuery.concat("POSITION_TYPE = 'Full time'");
            needWhere = needPosType = true;
        }
        if(partTimeChk.isSelected()) {
            if (chkBoxesSelected > 0) {
                posTypeQuery = posTypeQuery.concat(" OR ");
            }
            posTypeQuery = posTypeQuery.concat("POSITION_TYPE = 'Part time'");
            chkBoxesSelected++;
            needWhere = needPosType = true;
        }
        if(internshipChk.isSelected()) {
            if (chkBoxesSelected > 0) {
                posTypeQuery = posTypeQuery.concat(" OR ");
            }
            posTypeQuery = posTypeQuery.concat("POSITION_TYPE = 'Internship'");
            chkBoxesSelected++;
            needWhere = needPosType = true;
        }
        if(tempChk.isSelected()) {
            if (chkBoxesSelected > 0) {
                posTypeQuery = posTypeQuery.concat(" OR ");
            }
            posTypeQuery = posTypeQuery.concat("POSITION_TYPE = 'Temporary'");
            chkBoxesSelected++;
            needWhere = needPosType = true;
        }
        //position type query is setup--need space before and after
        
        industryQuery = new String("");
        int temp = industrySelect.getSelectedItem().toString().compareTo("Any");

        if (temp != 0) {
            industryQuery = industryQuery.concat("INDUSTRY = '" + industrySelect.getSelectedItem().toString()
                                        + "'");
            needWhere = needIndustry = true;
            //We also need to include 'Any' Industry Jobs in our results
            industryQuery = industryQuery.concat(" OR INDUSTRY = 'Any'");
        }
        //industry is setup for query
        /*
         * SELECT 	Job_ID, Job_title, Employer, Location, Position_type, Industry, 
Min_salary
FROM	 JOB
WHERE	 Job_title LIKE ‘%’&Keywords‘%’ AND
	    	Min_salary >= &Min_salary AND
	   	 Industry = &Industry AND
	   	 Position_type = &Position_type;*/

        dbQuery = new String("SELECT Job_ID, Job_title, Employer, JOB_LOCATION, Position_type, Industry, Min_salary" +
                " FROM ops$gtg624x.JOB");
        if (needWhere) {
                dbQuery = dbQuery.concat(" WHERE ");
                if(needMinSal) {
                    dbQuery = dbQuery.concat(minSalaryQuery);
                }
                if(needKeywords) {
                    if(needMinSal) {
                        dbQuery = dbQuery.concat(" AND ");
                    }
                    dbQuery = dbQuery.concat(keyWordQuery);
                }
                if(needPosType) {
                    if(needMinSal || needKeywords) {
                        dbQuery = dbQuery.concat(" AND ");
                    }
                    dbQuery = dbQuery.concat(posTypeQuery);
                }
                if(needIndustry) {
                    if(needMinSal || needKeywords || needPosType) {
                        dbQuery = dbQuery.concat(" AND ");
                    }
                    dbQuery = dbQuery.concat(industryQuery);
                }
        }
        //JOptionPane.showMessageDialog(null, needWhere + ":" + dbQuery);
        //System.out.println(dbQuery);
        try {
            model = dbLink.searchJobs(dbQuery);
        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(null,
			          new String[] {  // Display a 2-line message
				      ex.getClass().getName() + ": ",
				      ex.getMessage()
				  });
        }
        if (model != null) {
            searchResultsTbl.setModel(model);
            searchPopulated = true;
        } else {
            clearSearchTable();
        }
}//GEN-LAST:event_searchBtnActionPerformed

    private void industrySelectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_industrySelectActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_industrySelectActionPerformed

    private void keywordTxtActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_keywordTxtActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_keywordTxtActionPerformed

    private void partTimeChkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partTimeChkActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_partTimeChkActionPerformed

    private void showAllJobsBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showAllJobsBtnActionPerformed
        // TODO add your handling code here:
        if(showAllJobs == true) {
            showAllJobs = false;
            showAllJobsBtn.setText("Show all jobs");
            updateStatusTable();
        } else {
            showAllJobs = true;
            showAllJobsBtn.setText("Show only jobs in process");
            updateStatusTable();
        }
}//GEN-LAST:event_showAllJobsBtnActionPerformed
    
    private void updateStatusTable() {
        javax.swing.table.TableModel model = null;
        String dbQuery;
        
        if(showAllJobs == true) {
            dbQuery = new String("SELECT JOB_ID, JOB_TITLE, COMPANY_NAME, STATUS, to_char(DATE_APPLIED, 'MM-DD-YYYY') " + 
                                "FROM (((ops$gtg624x.APPLICATION NATURAL JOIN ops$gtg624x.JOB) " + 
                                "NATURAL JOIN ops$gtg624x.RECRUITER) NATURAL JOIN ops$gtg624x.APPLICATION_STATUS) " + 
                                "WHERE APPLICANT_ID = '"); //applicant id value added via DB query
        } else {
            dbQuery = new String("SELECT JOB_ID, JOB_TITLE, COMPANY_NAME, STATUS, to_char(DATE_APPLIED, 'MM-DD-YYYY') " + 
                                "FROM (((ops$gtg624x.APPLICATION NATURAL JOIN ops$gtg624x.JOB) " + 
                                "NATURAL JOIN ops$gtg624x.RECRUITER) NATURAL JOIN ops$gtg624x.APPLICATION_STATUS) " + 
                                "WHERE STATUS != 'Declined' AND Status != 'Accepted' AND " +
                                "APPLICANT_ID = '"); //applicant id value added via DB query
        }
        try {
            model = dbLink.getApplicantStatusTable(dbQuery);
        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(null,
			          new String[] {  // Display a 2-line message
				      ex.getClass().getName() + ": ",
				      ex.getMessage()
				  });
        }
        if (model != null) {
            appStatusTbl.setModel(model);
        }
    }
    
    private void submitBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_submitBtnActionPerformed
        // TODO add your handling code here:
        boolean success = false;
        String[] profile = new String[6];
        
        profile[0] = phoneTxt.getText().replace("-", " ");
        profile[1] = degreeSelect.getSelectedItem().toString();
        profile[2] = birthYear.getValue().toString();
        profile[3] = yearsExperience.getValue().toString();
        profile[4] = citizenshipSelect.getSelectedItem().toString();
        profile[5] = descriptionTxt.getText();
        
        try {
            success = dbLink.updateApplicantProfile(profile);
        } catch (SQLException se) {
            JOptionPane.showMessageDialog(null,
			          new String[] {  // Display a 2-line message
				      se.getClass().getName() + ": ",
				      se.getMessage()
				  });
        }
        if (!success) {
            JOptionPane.showMessageDialog(null, "Update failed!");
        }
}//GEN-LAST:event_submitBtnActionPerformed

    private void minSalaryTxtActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_minSalaryTxtActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_minSalaryTxtActionPerformed

    private void clearBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clearBtnActionPerformed
        // TODO add your handling code here:
        clearSearchTable();
    }//GEN-LAST:event_clearBtnActionPerformed

    private void tabbedPaneStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_tabbedPaneStateChanged
        // TODO add your handling code here:
        int sel = tabbedPane.getSelectedIndex();
        //JOptionPane.showMessageDialog(null,"Pane " + sel + " selected.");
        if (sel == 1) {
            updateStatusTable();
        } else if (sel == 2) {
            profileTab();
        }
}//GEN-LAST:event_tabbedPaneStateChanged

    private void signOutBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_signOutBtnActionPerformed
        // TODO add your handling code here:
        dbLink.close();
        welcome dialog = new welcome(new javax.swing.JFrame(), true);
        dialog.addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent e) {
                System.exit(0);
            }
        });
        dispose();
        dialog.setVisible(true);
    }//GEN-LAST:event_signOutBtnActionPerformed

    private void searchResultsTblMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchResultsTblMouseClicked
        // TODO add your handling code here:
        String[] details = null;
        boolean testReq = false;
        int col = searchResultsTbl.getSelectedColumn();
        int row = searchResultsTbl.getSelectedRow();
        if (((col == 0) || (col == 1)) && searchPopulated) {
            if(col == 0) { //Selected a Job - give option to apply
                try {
                    details = dbLink.getJobDetail(row);
                } catch(SQLException ex) {
                    JOptionPane.showMessageDialog(null,
			          new String[] {  // Display a 2-line message
				      ex.getClass().getName() + ": ",
				      ex.getMessage()
				  });
                }
                if(details != null) {
                    String[] jobDetail = new String[] { //Display a multi-line message
                        "Job Detail\n",
                        "Job title: \t\t\t" + details[0],
                        "Number of Positions: \t" + details[1],
                        "Industry: \t\t" + details[2],
                        "Position type: \t" + details[3],
                        "Minimum Salary: \t" + details[4],
                        "Test: \t\t" + details[5],
                        "Minimum Test Score: \t" + details[6],
                        "Contact Email: \t" + details[7],
                        "Phone: \t\t" + details[8],
                        "Fax: \t\t\t" + details[9],
                        "Job Description: \t" + details[10]
                    };
                    Object[] options = { "BACK", "APPLY" };
                    int retVal = JOptionPane.showOptionDialog(null, jobDetail, "Job Detail - Apply for job?",
                        JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);
                    //retVal will be 0 for BACK and -1 for Exit and 1 for APPLY
                    if (retVal == 1) {
                        boolean worked = false;
                        boolean alreadyApplied = false;
                        if (details[5].equals("No test required")) {
                            testReq = false;
                        } else {
                            testReq = true;
                        }
                        try {
                            worked = dbLink.applyForJob(row, testReq);
                        } catch(SQLException ex) {
                            //Only display SQL Error if it is an error...ignore if it is because we have already applied
                            if(ex.getErrorCode() == 1) {
                                alreadyApplied = true;
                            } else {
                                JOptionPane.showMessageDialog(null,
                                      new String[] {  // Display a 2-line message
                                          ex.getClass().getName() + ": ",
                                          ex.getMessage()
                                      });
                            }
                        }
                        if (worked) {
                            JOptionPane.showMessageDialog(null, "Job applied for.", "Apply for job", JOptionPane.INFORMATION_MESSAGE);
                        } else {
                            if (alreadyApplied) {
                                JOptionPane.showMessageDialog(null, "You've already applied for this job.\n" + 
                                        "The job cannot be applied to again.", "Apply for job", JOptionPane.INFORMATION_MESSAGE);
                            } else {
                                JOptionPane.showMessageDialog(null, "ERROR: Job application failed!", "Apply for job", JOptionPane.WARNING_MESSAGE);
                            }
                        }
                    }
                }
            }
            if (col == 1) { //Selected a company - provide company/recruiter info
                try {
                    details = dbLink.getCompanyDetail(row);
                } catch(SQLException ex) {
                    JOptionPane.showMessageDialog(null,
			          new String[] {  // Display a 2-line message
				      ex.getClass().getName() + ": ",
				      ex.getMessage()
				  });
                }
                if(details != null) {
                    JOptionPane.showMessageDialog(null,
                            new String[] { //Display a multi-line message
                        "Company Detail\n",
                        "Contact Person: \t\t\t" + details[0],
                        "Contact Email: \t" + details[1],
                        "Phone #: \t\t" + details[2],
                        "Fax #: \t" + details[3],
                        "Website: \t" + details[4],
                        "Description: \t\t" + details[5]
                    });
                }
            }
        }
    }//GEN-LAST:event_searchResultsTblMouseClicked

    private void appStatusTblMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_appStatusTblMouseClicked
        // TODO add your handling code here:
        String[] details = null;
        int col = appStatusTbl.getSelectedColumn();
        int row = appStatusTbl.getSelectedRow();
        if ((col == 0) || (col == 1)) {
            if(col == 0) {
                try {
                    details = dbLink.getJobDetail(row);
                } catch(SQLException ex) {
                    JOptionPane.showMessageDialog(null,
			          new String[] {  // Display a 2-line message
				      ex.getClass().getName() + ": ",
				      ex.getMessage()
				  });
                }
                if(details != null) {
                    JOptionPane.showMessageDialog(null,
                            new String[] { //Display a multi-line message
                        "Job Detail\n",
                        "Job title: \t\t\t" + details[0],
                        "Number of Positions: \t" + details[1],
                        "Industry: \t\t" + details[2],
                        "Position type: \t" + details[3],
                        "Minimum Salary: \t" + details[4],
                        "Test: \t\t" + details[5],
                        "Minimum Test Score: \t" + details[6],
                        "Contact Email: \t" + details[7],
                        "Phone: \t\t" + details[8],
                        "Fax: \t\t\t" + details[9],
                        "Job Description: \t" + details[10]
                    });
                }
            }
            if (col == 1) {
                try {
                    details = dbLink.getCompanyDetail(row);
                } catch(SQLException ex) {
                    JOptionPane.showMessageDialog(null,
			          new String[] {  // Display a 2-line message
				      ex.getClass().getName() + ": ",
				      ex.getMessage()
				  });
                }
                if(details != null) {
                    JOptionPane.showMessageDialog(null,
                            new String[] { //Display a multi-line message
                        "Company Detail\n",
                        "Contact Person: \t\t\t" + details[0],
                        "Contact Email: \t" + details[1],
                        "Phone #: \t\t" + details[2],
                        "Fax #: \t" + details[3],
                        "Website: \t" + details[4],
                        "Description: \t\t" + details[5]
                    });
                }
            }
        }
    }//GEN-LAST:event_appStatusTblMouseClicked
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new applicantMainPage().setVisible(true);
            }
        });
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTable appStatusTbl;
    private javax.swing.JSpinner birthYear;
    private javax.swing.JComboBox citizenshipSelect;
    private javax.swing.JButton clearBtn;
    private javax.swing.JComboBox degreeSelect;
    private javax.swing.JTextArea descriptionTxt;
    private javax.swing.JCheckBox fullTimeChk;
    private javax.swing.JComboBox industrySelect;
    private javax.swing.JCheckBox internshipChk;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JPanel jobsPanel;
    private javax.swing.JTextField keywordTxt;
    private javax.swing.JFormattedTextField minSalaryTxt;
    private javax.swing.JCheckBox partTimeChk;
    private javax.swing.JFormattedTextField phoneTxt;
    private javax.swing.JPanel profilePanel;
    private javax.swing.JButton searchBtn;
    private javax.swing.JLabel searchResultsLbl;
    private javax.swing.JTable searchResultsTbl;
    private javax.swing.JButton showAllJobsBtn;
    private javax.swing.JButton signOutBtn;
    private javax.swing.JPanel statusPanel;
    private javax.swing.JButton submitBtn;
    private javax.swing.JTabbedPane tabbedPane;
    private javax.swing.JCheckBox tempChk;
    private javax.swing.JSpinner yearsExperience;
    // End of variables declaration//GEN-END:variables
    
}
